<%layout("/common/_layout.html"){ %>
<style>
	.table-title{
		width: 150px;
	}

</style>
<script type="text/javascript">
var keywordsObj = {};
var submit_btn = function(businessType){
	if($("#name").val())
		keywordsObj.name = $("#name").val();
	if($("#phone_no").val())
		keywordsObj.phone_no = $("#phone_no").val();
	if($("#card_phone_no").val())
		keywordsObj.card_phone_no = $("#card_phone_no").val();
    var keywords = "";
    if(!$.isEmptyObject(keywordsObj)){
      keywords = JSON.stringify(keywordsObj);
    }
    $("#keywords").val(keywords);
	if(businessType == "search"){
		$("#list-form").submit();
	}else if(businessType == "export"){
		window.location.href = "${base}/cmccCardOrder/exportAll?keywords="+keywords;
	}
}
document.onkeydown = function(event){
	if(event.keyCode==13){
		submit_btn('search');
	}
}

</script>

<%#ajax userTable:{%>
<div class="am-cf am-padding">
	<div class="am-fl am-cf">
		<strong class="am-text-primary am-text-lg">报表中心</strong> /<small>现场写卡报表</small>
	</div>
</div>

<div class="am-g">
	<%include("cmcc_card_order_query.tpl"){}%>

</div>

	<div class="am-g">
		<div class="am-u-sm-12">
			<%if(pager.totalRow > 0){%>
			<div class="am-scrollable-horizontal">
				<table class="am-table am-table-striped am-table-hover table-main" style="TABLE-LAYOUT: fixed">
					<thead>
						<tr class="am-text-nowrap">
							<th class="table-title">姓名</th>
							<th class="table-title">手机号</th>
							<th class="table-title">工号</th>
							<th class="table-title">写卡号码</th>
							<th class="table-title">写白卡号码</th>
							<th class="table-title">写卡资费名称</th>
							<th class="table-title">写卡资费代码</th>
							<th class="table-title">写卡时间</th>

						</tr>
					</thead>
					<tbody>
						<%for(item in pager.list!){%>
						<tr>
							<td style="word-wrap:break-word;">${item.name}</td>
							<td style="word-wrap:break-word;">${item.phone_no}</td>
							<td style="word-wrap:break-word;">${item.emp_code}</td>
							<td style="word-wrap:break-word;">${item.card_phone_no}</td>
							<td style="word-wrap:break-word;">${item.card_number}</td>
							<td style="word-wrap:break-word;">${item.business_name}</td>
							<td style="word-wrap:break-word;">${item.business_code}</td>
							<td style="word-wrap:break-word;">${item.created_time, dateFormat="yyyy-MM-dd HH:mm:ss"}</td>
						</tr>
						<%}%>
					</tbody>
				</table>
			</div>
			<%}%>
			<div class="am-cf">
				<!-- 分页 -->
				<%if (pager.list.~size > 0){%>
				<div class="am-fr"><% include("/admin/common_pager.tpl"){}%></div>
				<%}else{%>
				<div class="am-kai" style="padding-bottom: 150px;">
					<h3>没有找到任何记录!</h3>
				</div>
				<%}%>
			</div>

		</div>
	</div>
	<div class="am-modal am-modal-no-btn" tabindex="-1" id="modal">
		<div class="am-modal-dialog">
			<div class="am-modal-hd">
				<i class="am-icon-refresh am-icon-spin"></i> <a
					href="javascript: void(0)" class="am-close am-close-spin"
					data-am-modal-close>&times;</a>
			</div>
			<div class="am-modal-bd">正在处理，请稍等...</div>
		</div>
	</div>
	<%}%> <%}%>